<?php
/*************************************************************************************
   Copyright notice
   
   (c) 2002-2007 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
 
   This script is part of PHPWCMS. The PHPWCMS web content management system is
   free software; you can redistribute it and/or modify it under the terms of
   the GNU General Public License as published by the Free Software Foundation;
   either version 2 of the License, or (at your option) any later version.
  
   The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
   A copy is found in the textfile GPL.txt and important notices to the license 
   from the author is found in LICENSE.txt distributed with these scripts.
  
   This script is distributed in the hope that it will be useful, but WITHOUT ANY 
   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
   This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************

   JW Image Rotator Module v3 by breitsch (mail@casa-loca.com)

*************************************************************************************/

// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------


// Imagerotator module content part frontend article rendering

// if you want to access module vars check that var
// $phpwcms['modules'][$crow["acontent_module"]]

$content['imagerotator'] = array();

$content['imagerotator'] = @unserialize($crow["acontent_form"]);

if(isset($content['imagerotator']['fmp_add_id'])) {
	
	// load Mootools - disabled in v2
	/*
if (file_exists(TEMPLATE_PATH.'inc_js/mootools/mootools.js')){
	$block['custom_htmlhead']['mootools.js']	= '  <script src="'.TEMPLATE_PATH.'inc_js/mootools/mootools.js" type="text/javascript"></script>';
} else {
	$block['custom_htmlhead']['mootools.js']	= '  <script src="'.$phpwcms['modules'][$crow['acontent_module']]['dir'].'template/js/mootools.js" type="text/javascript"></script>';
}
*/
  //load swfobject v.2.1
//	$block['custom_htmlhead']['swfobject.js'] = '<script src="'.$phpwcms['modules'][$crow['acontent_module']]['dir'].'template/swfobject/swfobject.js" type="text/javascript"></script>';

		// Load SwfObject 2.1 - new in V3
		initSwfObject();

	//css for ff
  $block['custom_htmlhead']['imagerotator.css'] ='<style type="text/css">'.LF.'  .FWR_DivContainer object {outline:0;}'.LF.'</style>';
	// set player defaults first
	if(empty($content['imagerotator']['fmp_width'])) {
		$content['imagerotator']['fmp_width']	= 320;
	}
	if(empty($content['imagerotator']['fmp_height'])) {
		$content['imagerotator']['fmp_height']	= 240;
	}
	if(empty($content['imagerotator']['fmp_set_flashversion'])) {
		$content['imagerotator']['fmp_set_flashversion'] = 9;
	}
	// defalt background-color
	if(empty($content['imagerotator']['fmp_set_bgcolor'])) {
		$content['imagerotator']['fmp_set_bgcolor'] = '000000';
	}
  //default highlightcolor
	if(empty($content['imagerotator']['fmp_set_hcolor'])) {
		$content['imagerotator']['fmp_set_hcolor'] = 'CC0000';
	}
  //default frontcolor
	if(empty($content['imagerotator']['fmp_set_color'])) {
		$content['imagerotator']['fmp_set_color'] = 'FFFFFF';
	}
  //default screencolor
	if(empty($content['imagerotator']['fmp_set_screencolor'])) {
		$content['imagerotator']['fmp_set_screencolor'] = '000000';
	}
  
  //init arrays and values
	$content['imagerotator']['flashvars'] 		= array();
	$content['imagerotator']['flashvars_ns'] 		= array(); //no script
	$content['imagerotator']['flashparam'] 		= array();
	$content['imagerotator']['flashparam_ns'] 		= array(); //no script
	$content['imagerotator']['flashvars_type']	= ''; //type (jpg,png,gif)

  $trans = array("?" => "%3F", "=" => "%3D", "&" => "%26", '"' => ""); //char replacement for flashvars

  // retrieve external file / playlist
  if(count($content['imagerotator']['fields'])==1 && $content['imagerotator']['fields'][0]['fmp_int_ext']) {
    // external single file
    $content['imagerotator']['file'] = $content['imagerotator']['fields'][0]['fmp_external_file'];	
  }

  // retrieve audio
	if($content['imagerotator']['fmp_audio_id']) {
	
		$sql = 'SELECT * FROM '.DB_PREPEND.'phpwcms_file WHERE f_aktiv=1 AND f_public=1 AND f_id='.$content['imagerotator']['fmp_audio_id'];
		$content['imagerotator']['audio_file'] = _dbQuery($sql);

		if(isset($content['imagerotator']['audio_file'][0])) {

			$content['imagerotator']['audio_file']		= $content['imagerotator']['audio_file'][0];
			$content['imagerotator']['fmp_audio_file']	= $content['imagerotator']['audio_file']['f_hash']. '.' . $content['imagerotator']['audio_file']['f_ext'];

      //$content['imagerotator']['audio_file']  = PHPWCMS_URL.PHPWCMS_FILES.$content['imagerotator']['fmp_audio_file'];
			$content['imagerotator']['audio_file']  = $phpwcms['modules'][$crow['acontent_module']]['dir'] . 'stream.php?file='.$content['imagerotator']['fmp_audio_file'];
		
      if($content['imagerotator']['audio_file']['f_ext']) {
				switch($content['imagerotator']['audio_file']['f_ext']) {
					case 'mp3':	$content['imagerotator']['audio_file']['f_type'] = 'audio/mpeg';
          break;
				}
			}
			$content['imagerotator']['audio_file'] .= '&type='.$content['imagerotator']['audio_file']['f_type'];

		} else { //no audio file
		
			$content['imagerotator']['fmp_audio_id'] = 0;
		
		}
	
	}
	
	//set cp id to vars
	$content['imagerotator']['var'] = 'fir'.$crow["acontent_id"];
	$content['imagerotator']['id']  = 'MODfir'.$crow["acontent_id"];
	$content['imagerotator']['js_id']  = 'MODfir'.$crow["acontent_id"]; //changed from OBJ to MOD for swfobject 2.1
	
  //if javascript enabled
  if ($content['imagerotator']['fmp_set_externalcomm']){
    $content['imagerotator']['flashparam'][] = 'allowscriptaccess : "always"';
    $content['imagerotator']['flashparam_ns'][] = '<param name="allowscriptaccess" value="always" />';
    $content['imagerotator']['flashvars'][] = 'enablejs : "true"';
    $content['imagerotator']['flashvars_ns'][] =  'enablejs=true';
    $content['imagerotator']['flashvars'][] = 'javascriptid : "'.$content['imagerotator']['js_id'].'"'; 
    $content['imagerotator']['flashvars_ns'][] = 'javascriptid='.$content['imagerotator']['js_id'].''; 
  
    //add the functions to the head
    $block['custom_htmlhead']['mediaplayer.js'] = '<script type="text/javascript">
  function sendEvent('.$content['imagerotator']['js_id'].',typ,prm) { 
    thisMovie('.$content['imagerotator']['js_id'].').sendEvent(typ,prm); 
  }
  function getUpdate(typ,pr1,pr2,'.$content['imagerotator']['js_id'].') {
  }
  function thisMovie('.$content['imagerotator']['js_id'].') {
    if(navigator.appName.indexOf("Microsoft") != -1) {
      return window['.$content['imagerotator']['js_id'].'];
    } else {
      return document['.$content['imagerotator']['js_id'].'];
    }
  }
</script>';

  }
  
	//colors	
	$content['imagerotator']['flashvars'][] = 'backcolor : "0x' . $content['imagerotator']['fmp_set_bgcolor'] . '"';
	$content['imagerotator']['flashvars'][] = 'lightcolor : "0x' . $content['imagerotator']['fmp_set_hcolor'] . '"';
	$content['imagerotator']['flashvars'][] = 'frontcolor : "0x' . $content['imagerotator']['fmp_set_color'] . '"';
	$content['imagerotator']['flashvars'][] = 'screencolor : "0x' . $content['imagerotator']['fmp_set_screencolor'] . '"';
	$content['imagerotator']['flashvars_ns'][] = 'backcolor=0x' . $content['imagerotator']['fmp_set_bgcolor'] . '';
	$content['imagerotator']['flashvars_ns'][] = 'lightcolor=0x' . $content['imagerotator']['fmp_set_hcolor'] . '';
	$content['imagerotator']['flashvars_ns'][] = 'frontcolor=0x' . $content['imagerotator']['fmp_set_color'] . '';
	$content['imagerotator']['flashvars_ns'][] = 'screencolor=0x' . $content['imagerotator']['fmp_set_screencolor'] . '';
  //wmode (parameter)
  $content['imagerotator']['flashparam'][] = 'wmode : "' . $content['imagerotator']['fmp_set_wmode'] . '"'; //opaque
  $content['imagerotator']['flashparam_ns'][] = '<param name="wmode" value="' . $content['imagerotator']['fmp_set_wmode'] . '" />';
  	
	//playlist or not?
	if (count($content['imagerotator']['fields'])==1 && $content['imagerotator']['fields'][0]['fmp_int_ext']) {
    // external
    //file* (url)
    $content['imagerotator']['flashvars'][] = 'file : "' . rawurlencode($content['imagerotator']['file']) . '"';
    $content['imagerotator']['flashvars_ns'][] = 'file=' . rawurlencode($content['imagerotator']['file']) . '';
    //title and link should come from external file
    //title
  	/*if($content['imagerotator']['fields'][0]['fmp_title'] && !$content['imagerotator']['fmp_set_hidetitles']) {
      $content['imagerotator']['flashvars'][] = 'title : "' . htmlspecialchars($content['imagerotator']['fields'][0]['fmp_title'], ENT_QUOTES) . '"';
    }*/
    //link (url)
    /*if($content['imagerotator']['fields'][0]['fmp_link']) {
		  $content['imagerotator']['fmp_link'] = explode(' ', $content['imagerotator']['fields'][0]['fmp_link']);
		  $content['imagerotator']['flashvars'][] = 'link : "' . rawurlencode(trim($content['imagerotator']['fmp_link'][0])) . '"';
    }*/
    
	} else if (count($content['imagerotator']['fields'])>0) {
	  //get the xml file
	  $mediafile = PHPWCMS_URL."content/tmp/playlist.rotator_".$crow['acontent_aid']."_".$crow['acontent_id'].".xml";
	  //file* (url) The rotator only accepts playlists.
    $content['imagerotator']['flashvars'][] = 'file : "' . rawurlencode($mediafile). '"'; //str_replace(array('?', '=', '&'), array('%3F', '%3D', '%26'), $content['imagerotator']['file'])
    $content['imagerotator']['flashvars_ns'][] = 'file=' . rawurlencode($mediafile). '';
    //shuffle* (true,false)
		$content['imagerotator']['flashvars'][] = 'shuffle : "' . ($content['imagerotator']['fmp_set_shuffle'] ? 'true' : 'false') . '"';
    $content['imagerotator']['flashvars_ns'][] = 'shuffle=' . ($content['imagerotator']['fmp_set_shuffle'] ? 'true' : 'false') . '';
  } else {
    
  }
  
  //height* (number)
	$content['imagerotator']['flashvars'][] = 'height : "' . $content['imagerotator']['fmp_height'] . '"';
	$content['imagerotator']['flashvars_ns'][] = 'height=' . $content['imagerotator']['fmp_height'] . '';
  //width* (number)
	$content['imagerotator']['flashvars'][] = 'width : "' . $content['imagerotator']['fmp_width'] . '"';
	$content['imagerotator']['flashvars_ns'][] = 'width=' . $content['imagerotator']['fmp_width'] . '';

	//autostart (true,false,muted)
	$content['imagerotator']['flashvars'][] = 'repeat : "' . ($content['imagerotator']['fmp_set_repeat'] ? 'true' : 'false') . '"';
  $content['imagerotator']['flashvars_ns'][] = 'repeat=' . ($content['imagerotator']['fmp_set_repeat'] ? 'true' : 'false') . '';

  //showicons* (true,false) default to false
  $content['imagerotator']['flashvars'][] = 'showicons : "false"';
  $content['imagerotator']['flashvars_ns'][] = 'showicons=false';

  //overstretch* (true,false,fit,none)
	if(isset($content['imagerotator']['fmp_set_overstretch']) && $content['imagerotator']['fmp_set_overstretch'] != 'default') {
		$content['imagerotator']['flashvars'][] = 'overstretch : "' . $content['imagerotator']['fmp_set_overstretch'] . '"';
		$content['imagerotator']['flashvars_ns'][] = 'overstretch=' . $content['imagerotator']['fmp_set_overstretch'] . '';
	}	
	//type (jpg,png,gif)
	if($content['imagerotator']['flashvars_type']) {
		$content['imagerotator']['flashvars'][] = 'type : "' . $content['imagerotator']['flashvars_type'] . '"';
		$content['imagerotator']['flashvars_ns'][] = 'type=' . $content['imagerotator']['flashvars_type'] . '';
	}
	//logo* (url)
	if($content['imagerotator']['fmp_set_logo']) {
		$content['imagerotator']['flashvars'][] = 'logo : "' . rawurlencode($content['imagerotator']['fmp_set_logo']) . '"';
		$content['imagerotator']['flashvars_ns'][] = 'logo=' . rawurlencode($content['imagerotator']['fmp_set_logo']) . '';
	}

  //rotatetime* (number)
  if($content['imagerotator']['fmp_set_rotatetime']) {
    $content['imagerotator']['flashvars'][] = 'rotatetime : "' . $content['imagerotator']['fmp_set_rotatetime'] . '"';
    $content['imagerotator']['flashvars_ns'][] = 'rotatetime=' . $content['imagerotator']['fmp_set_rotatetime'] . '';
  } else {
    $content['imagerotator']['flashvars'][] = 'rotatetime : "5"';
    $content['imagerotator']['flashvars_ns'][] = 'rotatetime=5';
  }

  //transition* (bgfade,blocks,bubbles,circles,fade,flash,fluids,lines,random,slowfade)
	if(isset($content['imagerotator']['fmp_set_transition'])) {
		$content['imagerotator']['flashvars'][] = 'transition : "' . $content['imagerotator']['fmp_set_transition'] . '"';
		$content['imagerotator']['flashvars_ns'][] = 'transition=' . $content['imagerotator']['fmp_set_transition'] . '';
	}	

  //shownavigation* (true,false):
  $content['imagerotator']['flashvars'][] = 'shownavigation : "' . ($content['imagerotator']['fmp_set_showcontrols'] ? 'true' : 'false') . '"';
  $content['imagerotator']['flashvars_ns'][] = 'shownavigation=' . ($content['imagerotator']['fmp_set_showcontrols'] ? 'true' : 'false') . '';

  //kenburns* (true,false)
  $content['imagerotator']['flashvars'][] = 'kenburns : "' . ($content['imagerotator']['fmp_set_kenburns'] ? 'true' : 'false') . '"';
  $content['imagerotator']['flashvars_ns'][] = 'kenburns=' . ($content['imagerotator']['fmp_set_kenburns'] ? 'true' : 'false') . '';

  //audio* (true,false)
  if ($content['imagerotator']['fmp_audio_id']){
  $content['imagerotator']['flashvars'][] = 'audio : "' . rawurlencode($content['imagerotator']['audio_file']) . '"';
  $content['imagerotator']['flashvars_ns'][] = 'audio=' . rawurlencode($content['imagerotator']['audio_file']) . '';
  //useaudio (true,false)//
  $content['imagerotator']['flashvars'][] = 'useaudio : "' . ($content['imagerotator']['fmp_set_useaudio'] ? 'false' : 'true') . '"';
  $content['imagerotator']['flashvars_ns'][] = 'useaudio=' . ($content['imagerotator']['fmp_set_useaudio'] ? 'false' : 'true') . '';
  $content['imagerotator']['flashvars'][] = 'volume : "' . ($content['imagerotator']['fmp_set_volume'] ? $content['imagerotator']['fmp_set_volume'] : '80') . '"';
  $content['imagerotator']['flashvars_ns'][] = 'volume=' . ($content['imagerotator']['fmp_set_volume'] ? $content['imagerotator']['fmp_set_volume'] : '80') . '';
  }
  
  //usefullscreen (true)
  $content['imagerotator']['flashvars'][] = 'usefullscreen : "' . ($content['imagerotator']['fmp_set_fullscreen'] ? 'true' : 'false') . '"';
  $content['imagerotator']['flashvars_ns'][] = 'usefullscreen=' . ($content['imagerotator']['fmp_set_fullscreen'] ? 'true' : 'false') . '';
  $content['imagerotator']['flashparam'][] = 'allowfullscreen : "' . ($content['imagerotator']['fmp_set_fullscreen'] ? 'true' : 'false') . '"';
  $content['imagerotator']['flashparam_ns'][] = '<param name="allowfullscreen" value="' . ($content['imagerotator']['fmp_set_fullscreen'] ? 'true' : 'false') . '" />';
  
  //$content['imagerotator']['flashvars'][] = 'searchbar : "true"';
  
  //linktarget new global
  $content['imagerotator']['flashvars'][] = 'linktarget :"' . $content['imagerotator']['fmp_set_linktarget'] . '"';
  $content['imagerotator']['flashvars_ns'][] = 'linktarget=' . $content['imagerotator']['fmp_set_linktarget'] . '';
  //linkfromdisplay* (true,false) set off by default
  $content['imagerotator']['flashvars'][] = 'linkfromdisplay : "false"';
  $content['imagerotator']['flashvars_ns'][] = 'linkfromdisplay=false';

	//start script output
	$content['imagerotator']['script']  = '<script type="text/javascript" language="javascript">'.LF.SCRIPT_CDATA_START.LF;
	$content['imagerotator']['script'] .= 'var '.$content['imagerotator']['var'].'flashvars = {'.LF.implode(','.LF.'', $content['imagerotator']['flashvars']).LF.'};'.LF;
	$content['imagerotator']['script'] .= 'var '.$content['imagerotator']['var'].'params = {'.LF.implode(','.LF.'', $content['imagerotator']['flashparam']).LF.'};'.LF;

  //include additional script code
  $content['imagerotator']['script']	.= LF.$content['imagerotator']['fmp_script'];

  //Flash version
  $version_tmp = array();
  $version_tmp = explode('.', $content['imagerotator']['fmp_set_flashversion']); //just to make sure in case someone added mayor.minor.release
  (isset($version_tmp[0])) ? $versionparam0 = trim($version_tmp[0]) : $versionparam0 = '9';
  (isset($version_tmp[1])) ? $versionparam1 = trim($version_tmp[1]) : $versionparam1 = '0';
  (isset($version_tmp[2])) ? $versionparam2 = trim($version_tmp[2]) : $versionparam2 = '0';
  $content['imagerotator']['fmp_set_flashversion'] = $versionparam0 .'.'. $versionparam1 .'.'. $versionparam2  ; 

	//write loader
	$content['imagerotator']['script']	.= LF.'swfobject.embedSWF("'.PHPWCMS_URL.$phpwcms['modules'][$crow['acontent_module']]['dir'].'template/';
  $content['imagerotator']['script']	.= 'jw_image_rotator/imagerotator.swf", "'.$content['imagerotator']['id'];
  $content['imagerotator']['script']	.= '", "'.$content['imagerotator']['fmp_width'].'", "'.$content['imagerotator']['fmp_height'].'", "'.$content['imagerotator']['fmp_set_flashversion'].'"';
  $content['imagerotator']['script']	.= ', false, '.$content['imagerotator']['var'].'flashvars, '.$content['imagerotator']['var'].'params);'.LF;
  
  //finish script output
	$content['imagerotator']['script']	.= SCRIPT_CDATA_END.LF.'</script>';
  
  //add the script output to the header
  $block['custom_htmlhead']['imagerotator'.$content['imagerotator']['var'].'.js'] = $content['imagerotator']['script'];

  //noscript
	$content['imagerotator']['noscript']	= '<noscript>
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'.$content['imagerotator']['fmp_width'].'" height="'.$content['imagerotator']['fmp_height'].'">
        <param name="movie" value="'.PHPWCMS_URL.$phpwcms['modules'][$crow['acontent_module']]['dir'].'template/jw_image_rotator/imagerotator.swf" />
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="'.PHPWCMS_URL.$phpwcms['modules'][$crow['acontent_module']]['dir'].'template/jw_image_rotator/imagerotator.swf" width="'.$content['imagerotator']['fmp_width'].'" height="'.$content['imagerotator']['fmp_height'].'">
        <!--<![endif]-->
        '.implode(LF.'        ', $content['imagerotator']['flashparam_ns']).'
        <param name="flashvars" value="'.implode('&amp;', $content['imagerotator']['flashvars_ns']).'" />
          <p>No Flash Media Player!</p>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </noscript>';
	
  //position
  $player_tmpl = "";
	switch($content['imagerotator']['cplayer_pos']) {
		//oben mitte
		case 1:	$player_tmpl .= '<div style="width:100%;text-align:center" class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div style="margin:auto;text-align:left;width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;" id="'.$content['imagerotator']['id'].'">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				    $player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
				break;
		//oben rechts
		case 2:	$player_tmpl .= '<div class="phpwcmsImgListRight">'.LF;
				    $player_tmpl .= '<div class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div id="'.$content['imagerotator']['id'].'" style="width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				    $player_tmpl .= '</div>'.LF;
				    $player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
				break;
		//unten links
		case 3: $player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
				    $player_tmpl .= '<div style="text-align:left;" class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div id="'.$content['imagerotator']['id'].'" style="width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				break;
		//unten mitte
		case 4: $player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
            $player_tmpl .= '<div style="width:100%;text-align:center" class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div style="margin:auto;text-align:left;width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;" id="'.$content['imagerotator']['id'].'">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				break;
		//unten rechts
		case 5:	$player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
				    $player_tmpl .= '<div class="phpwcmsImgListRight">'.LF;
				    $player_tmpl .= '<div class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div id="'.$content['imagerotator']['id'].'" style="width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				    $player_tmpl .= '</div>'.LF;
				break;
		//im Text links
		case 6:	$player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
				    $player_tmpl .= '<div style="float:left;margin:0 10px 10px 0" class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div id="'.$content['imagerotator']['id'].'" style="width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				break;
		//im Text rechts
		case 7: $player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
				    $player_tmpl .= '<div style="float:right;margin:0 10px 10px 0" class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div id="'.$content['imagerotator']['id'].'" style="width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				break;
		//oben links
		default:
				    $player_tmpl .= '<div class="FWR_DivContainer">'.LF;
            $player_tmpl .= '<div id="'.$content['imagerotator']['id'].'" style="width:'.$content['imagerotator']['fmp_width'].'px;height:'.$content['imagerotator']['fmp_height'].'px;">'.$content['imagerotator']['noscript'].'</div>'.LF;
            $player_tmpl .= '</div>'.LF;
				    $player_tmpl .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
	}

	// add rendering result to current listing
	$CNT_TMP				  .= $player_tmpl;

}

?>
